#ifndef _INETADDRESS_H
#define _INETADDRESS_H
#include <my_head.h>
#include <string>
using std::string;
class InetAddress
{
public:
    InetAddress(unsigned short port, const string &ip);
    InetAddress(const struct sockaddr_in addr);
    string ip();
    unsigned short port();
    struct sockaddr_in * getInetAddressPtr(){return & _addr;}
private:
    struct sockaddr_in _addr;
};

#endif
